let RTC_UI = function (app) {
	this.updateUserList = () => {
		console.log("updateUserList");
	}
	this.removeDom = (userId, userName) => {
		console.log("removeDom", userId, userName);
		app.noSignal();
	}
	this.addUser = (userId, userName) => {
		console.log("addUser", userId, userName);
	}
	this.updateUser = (userId, userName) => {
		console.log(userId, userName);
	}
	this.getPatientVideo = () => {
		let videoWrap = document.getElementById('videoWrap');
		if (!videoWrap) return;
		while (videoWrap.lastChild) {
			videoWrap.removeChild(videoWrap.lastChild);
		}
		let video = document.createElement('video');
		video.setAttribute('autoplay', '');
		video.setAttribute('playsinline', '');
		video.style.width = '100%';
		videoWrap.appendChild(video);
		return video;
	}
	this.getDoctorVideo = () => {
		let videoWrap = document.getElementById('benchDoctorVideoWrap');
		if (!videoWrap) return;
		while (videoWrap.lastChild) {
			videoWrap.removeChild(videoWrap.lastChild);
		}
		let video = document.createElement('video');
		video.classList.add('doctor-style');
		video.setAttribute('autoplay', '');
		video.setAttribute('playsinline', '');
		video.style.border = '1px solid gray';
		videoWrap.appendChild(video);
		return video;
	}
	this.sub = () => {
		let rtc_sub = !!this.app.rtc_sub;
		this.app.sub = !rtc_sub
		return !rtc_sub;
	}
	this.app = app;
};

export default RTC_UI;
